package com.example.sp01.entity;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Table(name = "pg")
public class pg {
    @Id
    @Column(name = "Pid")
    private Integer pid;
    
    @Id
    @Column(name = "Gno")
    private Integer gno;
    
    @Column(name = "Stime")
    private Date stime; // 起始时间
    
    @Column(name = "Etime")
    private Date etime; // 结束时间
    
    @Column(name = "Pcontent")
    private String pcontent; // 计划内容
    
    @Column(name = "Pplace")
    private String pplace; // 地点
    
    @Column(name = "Pat")
    private String pat; // 训练or测试
    
    @Column(name = "Gname")
    private String gname;

    public pg() {}

    public pg(Integer pid, Integer gno, Date stime, Date etime, String pcontent, String pplace, String pat, String gname) {
        this.pid = pid;
        this.gno = gno;
        this.stime = stime;
        this.etime = etime;
        this.pcontent = pcontent;
        this.pplace = pplace;
        this.pat = pat;
        this.gname = gname;
    }

    // Getter和Setter
    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public Integer getGno() {
        return gno;
    }

    public void setGno(Integer gno) {
        this.gno = gno;
    }

    public Date getStime() {
        return stime;
    }

    public void setStime(Date stime) {
        this.stime = stime;
    }

    public Date getEtime() {
        return etime;
    }

    public void setEtime(Date etime) {
        this.etime = etime;
    }

    public String getPcontent() {
        return pcontent;
    }

    public void setPcontent(String pcontent) {
        this.pcontent = pcontent;
    }

    public String getPplace() {
        return pplace;
    }

    public void setPplace(String pplace) {
        this.pplace = pplace;
    }

    public String getPat() {
        return pat;
    }

    public void setPat(String pat) {
        this.pat = pat;
    }

    public String getGname() {
        return gname;
    }

    public void setGname(String gname) {
        this.gname = gname;
    }
}